package me.yobol.greentable.commons.path;

import javax.servlet.http.HttpServletRequest;

/**
 * @author Yobol
 * 
 * s : Servlet
 * p(page) : Html / Jsp
 * c : Css
 * j : JavaScript
 * r : resource
 *
 */
public class JPath {
	
	public static String JS_FOLDER = "/js/";
	
	public static String getJSPath(HttpServletRequest request, String jsName){
		return request.getContextPath() + JS_FOLDER + jsName;
	}
	
	public static String jHeader(HttpServletRequest request){
		return getJSPath(request, "header.js");
	}
	
	public static String jRegister(HttpServletRequest request){
		return getJSPath(request, "register.js");
	}
	
	public static String jLogin(HttpServletRequest request){
		return getJSPath(request, "login.js");
	}
	
	public static String jJquery(HttpServletRequest request){
		return getJSPath(request, "jquery-3.1.1.min.js");
	}
	
	public static String jValidate(HttpServletRequest request){
		return getJSPath(request, "jquery.validate.min.js");
	}
	
	public static String jDishes(HttpServletRequest request){
		return getJSPath(request, "dishes.js");
	}
	
	public static String jIngredient(HttpServletRequest request){
		return getJSPath(request, "ingredient.js");
	}
	
	public static String jComment(HttpServletRequest request){
		return getJSPath(request, "comment.js");
	}
	
}
